using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Raster._RasterProperties
{
    /// <summary>
    /// <para>Batch Build Pyramids</para>
    /// <para>Builds pyramids for multiple raster datasets.</para>
    /// <para>为多个栅格数据集构建金字塔。</para>
    /// </summary>    
    [DisplayName("Batch Build Pyramids")]
    public class BatchBuildPyramids : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BatchBuildPyramids()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Raster_Datasets">
        /// <para>Input Raster Datasets</para>
        /// <para><xdoc>
        ///   <para>The raster datasets for which you want to build raster pyramids.</para>
        ///   <para>Each input should have more than 1024 rows and 1024 columns.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要为其构建栅格金字塔的栅格数据集。</para>
        ///   <para>每个输入应具有 1024 行和 1024 列以上。</para>
        /// </xdoc></para>
        /// </param>
        public BatchBuildPyramids(List<object> _Input_Raster_Datasets)
        {
            this._Input_Raster_Datasets = _Input_Raster_Datasets;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Batch Build Pyramids";

        public override string CallName => "management.BatchBuildPyramids";

        public override List<string> AcceptEnvironments => ["pyramid", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Raster_Datasets, _Pyramid_levels, _Skip_first_level.GetGPValue(), _Pyramid_resampling_technique.GetGPValue(), _Pyramid_compression_type.GetGPValue(), _Compression_quality, _Skip_Existing.GetGPValue(), _Batch_Build_Pyramids_Succeeded];

        /// <summary>
        /// <para>Input Raster Datasets</para>
        /// <para><xdoc>
        ///   <para>The raster datasets for which you want to build raster pyramids.</para>
        ///   <para>Each input should have more than 1024 rows and 1024 columns.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要为其构建栅格金字塔的栅格数据集。</para>
        ///   <para>每个输入应具有 1024 行和 1024 列以上。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster Datasets")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Input_Raster_Datasets { get; set; }


        /// <summary>
        /// <para>Pyramid levels</para>
        /// <para>Choose the number of reduced-resolution dataset layers that will be built. The default value is -1, which will build full pyramids. A value of 0 will result in no pyramid levels.</para>
        /// <para>选择将要构建的低分辨率数据集图层的数量。默认值为 -1，将构建完整的金字塔。值为 0 将导致没有金字塔级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid levels")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _Pyramid_levels { get; set; } = -1;


        /// <summary>
        /// <para>Skip first level</para>
        /// <para><xdoc>
        ///   <para>Choose whether to skip the first pyramid level. Skipping the first level will take up slightly less disk space, but it will slow down performance at these scales.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The first pyramid level will be built. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—The first pyramid level will not be built.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>选择是否跳过第一个金字塔级别。跳过第一级将占用稍少的磁盘空间，但会降低这些规模的性能。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 将构建第一个金字塔级别。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 不会构建第一个金字塔级别。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Skip first level")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Skip_first_level_value _Skip_first_level { get; set; } = _Skip_first_level_value._false;

        public enum _Skip_first_level_value
        {
            /// <summary>
            /// <para>SKIP_FIRST</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SKIP_FIRST")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Pyramid resampling technique</para>
        /// <para><xdoc>
        ///   <para>The resampling technique used to build your pyramids.</para>
        ///   <bulletList>
        ///     <bullet_item>Nearest neighbor—The nearest neighbor resampling method uses the value of the closest cell to assign a value to the output cell when resampling. This is the default.</bullet_item><para/>
        ///     <bullet_item>Bilinear—The bilinear interpolation resampling method determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.</bullet_item><para/>
        ///     <bullet_item>Cubic—The Cubic convolution resampling method determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于构建金字塔的重采样技术。</para>
        ///   <bulletList>
        ///     <bullet_item>最近邻 - 最近邻重采样方法在重采样时使用最近像元的值为输出像元分配值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>双线性—双线性插值重采样方法根据四个最近输入像元中心的加权距离平均值确定像元的新值。</bullet_item><para/>
        ///     <bullet_item>立方 - 三次卷积重采样方法基于通过 16 个最近的输入像元中心拟合平滑曲线来确定像元的新值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid resampling technique")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Pyramid_resampling_technique_value _Pyramid_resampling_technique { get; set; } = _Pyramid_resampling_technique_value._NEAREST;

        public enum _Pyramid_resampling_technique_value
        {
            /// <summary>
            /// <para>Nearest neighbor</para>
            /// <para>Nearest neighbor—The nearest neighbor resampling method uses the value of the closest cell to assign a value to the output cell when resampling. This is the default.</para>
            /// <para>最近邻 - 最近邻重采样方法在重采样时使用最近像元的值为输出像元分配值。这是默认设置。</para>
            /// </summary>
            [Description("Nearest neighbor")]
            [GPEnumValue("NEAREST")]
            _NEAREST,

            /// <summary>
            /// <para>Bilinear</para>
            /// <para>Bilinear—The bilinear interpolation resampling method determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.</para>
            /// <para>双线性—双线性插值重采样方法根据四个最近输入像元中心的加权距离平均值确定像元的新值。</para>
            /// </summary>
            [Description("Bilinear")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

            /// <summary>
            /// <para>Cubic</para>
            /// <para>Cubic—The Cubic convolution resampling method determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.</para>
            /// <para>立方 - 三次卷积重采样方法基于通过 16 个最近的输入像元中心拟合平滑曲线来确定像元的新值。</para>
            /// </summary>
            [Description("Cubic")]
            [GPEnumValue("CUBIC")]
            _CUBIC,

        }

        /// <summary>
        /// <para>Pyramid compression type</para>
        /// <para><xdoc>
        ///   <para>The compression type to use when building the raster pyramids.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—If the source data is compressed using a wavelet compression, it will build pyramids with the JPEG compression type; otherwise, LZ77 will be used. This is the default compression method.</bullet_item><para/>
        ///     <bullet_item>LZ77 Compression—The LZ77 compression algorithm will be used to build the pyramids. LZ77 can be used for any data type.</bullet_item><para/>
        ///     <bullet_item>JPEG—The JPEG compression algorithm to build pyramids. Only data that adheres to the JPEG compression specification can use this compression type. If JPEG is chosen, you can then set the compression quality.</bullet_item><para/>
        ///     <bullet_item>None—No compression will be used when building pyramids.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>构建栅格金字塔时要使用的压缩类型。</para>
        ///   <bulletList>
        ///     <bullet_item>默认 - 如果使用小波压缩对源数据进行压缩，则将构建具有 JPEG 压缩类型的金字塔;否则，将使用 LZ77。这是默认的压缩方法。</bullet_item><para/>
        ///     <bullet_item>LZ77 压缩—LZ77 压缩算法将用于构建金字塔。LZ77 可用于任何数据类型。</bullet_item><para/>
        ///     <bullet_item>JPEG - 用于构建金字塔的 JPEG 压缩算法。只有符合 JPEG 压缩规范的数据才能使用此压缩类型。如果选择了 JPEG，则可以设置压缩质量。</bullet_item><para/>
        ///     <bullet_item>无 （None） - 构建金字塔时不使用压缩。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid compression type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Pyramid_compression_type_value _Pyramid_compression_type { get; set; } = _Pyramid_compression_type_value._DEFAULT;

        public enum _Pyramid_compression_type_value
        {
            /// <summary>
            /// <para>Default</para>
            /// <para>Default—If the source data is compressed using a wavelet compression, it will build pyramids with the JPEG compression type; otherwise, LZ77 will be used. This is the default compression method.</para>
            /// <para>默认 - 如果使用小波压缩对源数据进行压缩，则将构建具有 JPEG 压缩类型的金字塔;否则，将使用 LZ77。这是默认的压缩方法。</para>
            /// </summary>
            [Description("Default")]
            [GPEnumValue("DEFAULT")]
            _DEFAULT,

            /// <summary>
            /// <para>JPEG</para>
            /// <para>JPEG—The JPEG compression algorithm to build pyramids. Only data that adheres to the JPEG compression specification can use this compression type. If JPEG is chosen, you can then set the compression quality.</para>
            /// <para>JPEG - 用于构建金字塔的 JPEG 压缩算法。只有符合 JPEG 压缩规范的数据才能使用此压缩类型。如果选择了 JPEG，则可以设置压缩质量。</para>
            /// </summary>
            [Description("JPEG")]
            [GPEnumValue("JPEG")]
            _JPEG,

            /// <summary>
            /// <para>LZ77 Compression</para>
            /// <para>LZ77 Compression—The LZ77 compression algorithm will be used to build the pyramids. LZ77 can be used for any data type.</para>
            /// <para>LZ77 压缩—LZ77 压缩算法将用于构建金字塔。LZ77 可用于任何数据类型。</para>
            /// </summary>
            [Description("LZ77 Compression")]
            [GPEnumValue("LZ77")]
            _LZ77,

            /// <summary>
            /// <para>None</para>
            /// <para>None—No compression will be used when building pyramids.</para>
            /// <para>无 （None） - 构建金字塔时不使用压缩。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

        }

        /// <summary>
        /// <para>Compression quality</para>
        /// <para>The compression quality to use when pyramids are built with the JPEG compression method. The value must be between 0 and 100. The values closer to 100 will produce a higher-quality image, but the compression ratio will be lower.</para>
        /// <para>使用 JPEG 压缩方法构建金字塔时要使用的压缩质量。该值必须介于 0 和 100 之间。接近 100 的值将产生更高质量的图像，但压缩比会更低。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compression quality")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _Compression_quality { get; set; } = 75;


        /// <summary>
        /// <para>Skip Existing</para>
        /// <para><xdoc>
        ///   <para>Specify whether to build pyramids only where they are missing or regenerate them even if they exist.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Pyramids will be built even if they already exist. Therefore, existing pyramids will be overwritten. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Pyramids will only be built if they do not exist.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是仅在金字塔缺失的地方构建金字塔，还是即使金字塔存在也重新生成金字塔。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 即使金字塔已存在，也会构建金字塔。因此，现有的金字塔将被覆盖。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 仅当金字塔不存在时，才会构建金字塔。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Skip Existing")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Skip_Existing_value? _Skip_Existing { get; set; } = null;

        public enum _Skip_Existing_value
        {
            /// <summary>
            /// <para>SKIP_EXISTING</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SKIP_EXISTING")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>OVERWRITE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OVERWRITE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Batch Build Pyramids Succeeded</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Batch Build Pyramids Succeeded")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Batch_Build_Pyramids_Succeeded { get; set; }


        public BatchBuildPyramids SetEnv(object pyramid = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(pyramid: pyramid, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}